package nix.tag;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class MyTag5 extends SimpleTagSupport {

	private boolean condition;

	public void setCondition(boolean condition) {
		this.condition = condition;
	}

	@Override
	public void doTag() throws JspException, IOException {

		if (condition) {
			this.getJspBody().invoke(null);// 传null，相当于传this.getJspContext().getOut()
		}
	}
}
